﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zj.OpenAuth.Domain.Core;

namespace Zj.OpenAuth.Domain.Interface
{
    /// <summary>
    /// role repository interface
    /// </summary>
    public interface IRoleRepository
        : IRepository<Role>
    {
        /// <summary>
        ///get all menu list by role 
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<int> GetAllMenuListByRole(int roleId);



        /// <summary>
        ///get all menu list by role 
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<int> GetAllRoleListByUser(int userId);



        /// <summary>
        /// update role menu mapping
        /// </summary>
        /// <param name="roleId"></param>
        /// <param name="roleMenus"></param>
        /// <returns></returns>
        bool UpdateRoleMenu(int roleId, List<RoleMenuMapping> roleMenus);
    }
}
